<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page session="false"%>
<html lang="en">
<jsp:include page="header.jsp" flush="true">
	<jsp:param name="pageTitle" value="Create Community" />
</jsp:include>
<script type="text/javascript">
	function test1() {
		$("#communityName").val("Atmaca_53");
		$("create_commun").submit();
		document.getElementById("optionsRadios1").checked = false;
		document.getElementById("optionsRadios2").checked = false;
		document.getElementById("optionsRadios3").checked = false;
		document.getElementById("optionsRadios4").checked = false;
	}

	function test2() {
		$("#communityName").val("Atmaca_53");
		$("create_commun").submit();
		document.getElementById("optionsRadios1").checked = true;
		document.getElementById("optionsRadios2").checked = false;
		document.getElementById("optionsRadios3").checked = true;
		document.getElementById("optionsRadios4").checked = false;
	}

	function test3() {
		$("#communityName").val("Atmaca_53");
		$("create_commun").submit();
		document.getElementById("optionsRadios1").checked = false;
		document.getElementById("optionsRadios2").checked = true;
		document.getElementById("optionsRadios3").checked = false;
		document.getElementById("optionsRadios4").checked = true;
	}

	function test4() {
		$("#communityName").val("");
		$("create_commun").submit();
		document.getElementById("optionsRadios1").checked = true;
		document.getElementById("optionsRadios2").checked = false;
		document.getElementById("optionsRadios3").checked = true;
		document.getElementById("optionsRadios4").checked = false;
	}

	function test5() {
		$("#communityName").val("Atmaca_53");
		$("create_commun").submit();
		$("#communityDescription").val("dasdada");
		$("create_commun").submit();
		document.getElementById("optionsRadios1").checked = true;
		document.getElementById("optionsRadios2").checked = false;
		document.getElementById("optionsRadios3").checked = true;
		document.getElementById("optionsRadios4").checked = false;
	}
	/* $("#communityDate").datepicker({
		weekStart : 1
	});
	 */
	$(document).ready(function() {
		// This line applies the datepicker options to the element with an id attribute of "ScheduledDate"        
		// It also sets an option to require the minimum date that they can select to be today
		$("#communityDate").datepicker({
			minDate : +0
		});
	});
</script>

<style type="text/css">
html,body,.container {
	height: 100%;
}

.container {
	display: table;
	width: 100%;
	margin-top: -50px;
	padding-top: 50px;
	padding-bottom: 50px;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.row {
	height: 100%;
	display: table-row;
}

.form-control input[type=text] {
	height: 200px;
}

.mid-clm-create-comm {
	position: relative;
	min-height: 1px;
	/* padding-right: 15px;
    padding-left: 15px;*/
	padding-top: 25px;
	/* background-color:#f05607; */
	padding-bottom: 100%;
	margin-bottom: -100%;
	font-weight: normal;
	font-size: 120%;
}

.left-clm-create-comm {
	position: relative;
	min-height: 1px;
	padding-top: 15px;
	padding-bottom: 100%;
	margin-bottom: -100%;
}

.save {
	float: right;
	width: 100px;
}

.labelClass {
	color: #f05607;
}

.middle-form {
	padding-top: 25px;
}
</style>

<div class="container">
	<div class="row">
		<div class="col-md-3 no-float left-clm-create-comm"></div>
		<div class="col-md-6 no-float mid-clm-create-comm ">
			<form role="form" class="form-signin middle-form" method="POST"
				id="create_commun">
				<div class="form-group">

					<label for="communityName" class="labelClass">Community
						Name</label> <input type="text" name="name" class="form-control"
						id="communityName" placeholder="Please Enter Community Name"
						required>
				</div>
				<div class="form-group ">
					<label for="communityDescription" class="labelClass">Description</label>
					<!-- <input type="text" class="form-control" id="communityDescription" placeholder="Description">  -->
					<textarea class="form-control" rows="3" name="description"
						placeholder="Please Enter Description for Community"></textarea>
				</div>
				<label for="status" class="labelClass">Please Select
					Community Duration</label>
				<div class="radio status">
					<!-- deneme -->
					<label> <input type="radio" name="status"
						id="optionsRadios1" value="0" checked> Transient
					</label> <label> <input type="radio" name="status"
						id="optionsRadios2" value="1"> Permanent
					</label> <label> <input id="communityDate"
						data-date-format="dd.mm.yyyy" class="form-control"
						name="communityDateTime" />
					</label>

				</div>
				<label for="isPrivate" class="labelClass">Please Select
					Community Type</label>
				<div class="radio isPrivate">
					<label> <input type="radio" name="isPrivate"
						id="optionsRadios3" value="0" checked> Private
					</label> <label> <input type="radio" name="isPrivate"
						id="optionsRadios4" value="1"> Public
					</label>
				</div>
				<!-- 
				<label for="privateCBX">Is Private?</label> <input type="checkbox"
					name="isPrivate" id="privateCBX" /> -->

				<button type="submit" class="btn btn-default save">Save</button>
			</form>
		</div>
		<div class="col-md-3 no-float right-clm-create-comm"></div>
	</div>
</div>

</html>
